#ifndef __CI2C_H__
#define __CI2C_H__
#include <stdio.h>

#define pinMode(x,y)  
#define INPUT_PULLUP 2
#define OUTPUT 1
#define INPUT 0

#define HIGH 1
#define LOW 0
#define digitalWrite(x,y) 
#define digitalRead(x) x



typedef unsigned int uint32;
typedef unsigned char uint8;
typedef unsigned char BOOL;
#define False 0
#define True 1





void I2C_Init(uint32 SCL, uint32 SDA);

BOOL I2C_SendAddByte(uint8 addr, uint8 regaddr, uint8 data);
BOOL I2C_ReadAddByte(uint8 addr, uint8 regaddr, uint8* data);

BOOL I2C_SendAddArr(uint8 addr, uint8 regaddr, uint8* databuf, uint8 lenth);
BOOL I2C_ReadAddArr(uint8 addr, uint8 regaddr, uint8* databuf, uint8 lenth);



#endif 